home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / gpp-1_42.lha / g++-1.42.0 / Makefile < prev    next >
Makefile  |  1992-07-13  |  27KB  |  710 lines

  1. # Makefile for GNU C++ compiler.
  2. #   Copyright (C) 1987, 1988 Free Software Foundation, Inc.
  3. #   Hacked by Michael Tiemann (tiemann@mcc.com)
  4.  
  5. #This file is part of GNU CC.
  6.  
  7. #GNU CC is free software; you can redistribute it and/or modify
  8. #it under the terms of the GNU General Public License as published by
  9. #the Free Software Foundation; either version 1, or (at your option)
  10. #any later version.
  11.  
  12. #GNU CC is distributed in the hope that it will be useful,
  13. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. #GNU General Public License for more details.
  16.  
  17. #You should have received a copy of the GNU General Public License
  18. #along with GNU CC; see the file COPYING.  If not, write to
  19. #the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21.  
  22. # Variables that exist for you to override.
  23. # See below for how to change them for certain systems.
  24.  
  25. # These files depend on -DSOS:
  26. # cplus-class.o cplus-decl.o cplus-decl2.o cplus-init.o \
  27. # cplus-method.o cplus-typeck.o
  28.  
  29. # This file depends on -DESKIT: cplus-class.o
  30.  
  31. # These files depend on -DGATHER_STATISTICS: tree.c cplus-lex.c \
  32. # cplus-class.c cplus-search.c
  33.  
  34. # Defining NDEBUG will cause assertion macros to do nothing.
  35.  
  36. # This file depends on -DYYDEBUG: cplus-tab.c.  Without, you cannot
  37. # use `-dy'.
  38.  
  39. # On COFF systems with collect.c, use one of the definitions below. (see collect.c)
  40. # COFFLAGS =  -DUSE_COLLECT -DCOFF
  41. # COFFLAGS =  -DUSE_COLLECT -DEXTENDED_COFF
  42.  
  43. #define what is appropriate for your system
  44. #LD= ld++
  45. LD= collect3
  46.  
  47. # Format of the C/DTOR_LIST (gld 1.x uses OLD_FORMAT)
  48. FORMAT = -DOLD_FORMAT
  49.  
  50. # On some BSD systems (like Vax, unlike Sun), there is no file
  51. # /usr/include/unistd.h.  If this is the case for your system
  52. # uncomment the following line.
  53. # HAVE_UNISTD_H = -DNO_UNISTD_H
  54.  
  55. GCC_TEST = ../gcc-test
  56.  
  57. # CFLAGS = -g -DSOS -DESKIT -O
  58. CFLAGS = -g -DGATHER_STATISTICS -DNO_DYNAMIC_LIBS -O -B$(GCC_TEST)/
  59. CC = ../gcc-test/gcc
  60. BISON = bison
  61. BISONFLAGS = -v -d
  62. AR = ar
  63. RANLIB = ranlib
  64. SHELL = /bin/sh
  65. # on sysV, define this as cp.
  66. INSTALL = install -c
  67. # on sysV, define this as ln.
  68. LINK = ln -s
  69.  
  70. # Compiler to use for compiling gnulib.
  71. # OLDCC should not be the GNU C compiler.
  72. OLDCC = cc
  73.  
  74. # CFLAGS for use with OLDCC, for compiling gnulib.
  75. # NOTE: -O does not work on some Unix systems!
  76. # If you use it here, you are asking for trouble.
  77. CCLIBFLAGS=
  78.  
  79. # USG_STDIO if for machines which use System V stdio.
  80. # In general, if USG is #defined by your system, you should
  81. # uncomment the following line.  But turncoats who claim officially
  82. # to support System V, but really try to be Berkeley (and thus
  83. # break with USG defined), may need to define this.
  84. # USG_STDIO = -DUSG_STDIO
  85.  
  86. prefix=/usr/local
  87. #prefix=/usr/unsupported
  88.  
  89. # Directory where sources are, from where we are.
  90. srcdir = .
  91. # Directory in which to put the executable for the command `g++'
  92. bindir = $(prefix)/bin
  93. # Directory in which to put the subprograms used by the compiler.
  94. libdir = $(prefix)/lib
  95. # Directory in which to put the crt0+.o, crt1+.o, and other such files.
  96. startdir = $(prefix)/lib
  97. # Directory in which to put man pages.
  98. mandir = $(prefix)/man/man1
  99. # Number to put in man-page filename.
  100. manext = 1
  101.  
  102. # Additional system libraries to link with.
  103. CLIB=
  104.  
  105. # Change this to a null string if obstacks are installed in the
  106. # system library.
  107. OBSTACK=obstack.o
  108.  
  109. # Directory to link to, when using the target `maketest'.
  110. DIR = ../gcc
  111. # this is the GNU CC build directory
  112. TDIR = $(GCC_TEST)
  113.  
  114. # End of variables for you to override.
  115.  
  116.  
  117. # Variables you should change for certain systems.
  118.  
  119. # These are what you would need on HPUX:
  120. # CFLAGS = -Wc,-Ns2000 -Wc,-Ne700 -Wc,-Np300 -Wc,-Nw1000
  121. # If you are using the GNU assembler and linker on HPUX,
  122. # add -I../hp-include to CFLAGS.
  123. # -g is desirable in CFLAGS, but a compiler bug in HPUX version 5
  124. # bites whenever tree.def, rtl.def or machmode.def is included
  125. # (ie., on every source file).
  126. # CCLIBFLAGS = -Wc,-Ns2000 -Wc,-Ne700
  127. # For CCLIBFLAGS you might want to specify the switch that
  128. # forces only 68000 instructions to be used.
  129.  
  130. # If you are making gcc for the first time, and if you are compiling it with
  131. # a non-gcc compiler, and if your system doesn't have a working alloca() in any
  132. # of the standard libraries (as is true for HP/UX or Genix),
  133. # then get alloca.c from GNU Emacs and un-comment the following line:
  134. # ALLOCA = alloca.o
  135. # But don't do that if compiling using GCC.
  136.  
  137. # If your system has alloca() in /lib/libPW.a, un-comment the following line:
  138. # CLIB= -lPW
  139.  
  140. # If your system's malloc() routine fails for any reason (as it does on
  141. # certain versions of Genix), try getting the files
  142. # malloc.c and getpagesize.h from GNU Emacs and un-comment the following line:
  143. MALLOC = malloc.o
  144.  
  145. # If you are running GCC on an Apollo (SR10.x),
  146. # go into a Berkeley environment and use this:
  147. # CFLAGS = -g -A nansi -A cpu,3000 -A runtype,bsd4.3 -A systype,any -DSHORT_ENUM_BUG
  148. # (Says vasta@apollo.com.)
  149.  
  150.  
  151. # Dependency on obstack, alloca, malloc or whatever library facilities
  152. # are not installed in the system libraries.
  153. LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC)
  154.  
  155. # How to link with both our special library facilities
  156. # and the system's installed libraries.
  157. LIBS = $(OBSTACK) $(ALLOCA) $(MALLOC) $(CLIB)
  158.  
  159. # Specify the directories to be searched for header files.
  160. # Both . and srcdir are used, in that order,
  161. # so that tm.h and config.h will be found in the compilation
  162. # subdirectory rather than in the source directory.
  163. INCLUDES = -I. -I$(srcdir) -I$(srcdir)/config
  164. SUBDIR_INCLUDES = -I.. -I../$(srcdir) -I../$(srcdir)/config
  165.  
  166. # Always use -I$(srcdir)/config when compiling.
  167. .c.o:
  168.     $(CC) -c $(CFLAGS) $(CPPFLAGS) $(INCLUDES) $<
  169.  
  170. # Language-specific object files for C.
  171. C_OBJS = c-parse.tab.o c-decl.o c-typeck.o c-convert.o
  172.  
  173. # Language-specific object files for C++.
  174. CPLUS_OBJS = cplus-tab.o cplus-decl.o cplus-decl2.o cplus-typeck.o cplus-type2.o \
  175.  cplus-tree.o cplus-lex.o cplus-class.o cplus-init.o cplus-except.o \
  176.  cplus-method.o cplus-cvt.o cplus-search.o cplus-ptree.o cplus-expr.o
  177.  
  178. # Language-independent object files.
  179. OBJS = toplev.o version.o tree.o print-tree.o stor-layout.o \
  180.  fold-const.o rtl.o rtlanal.o expr.o stmt.o case.o expmed.o explow.o \
  181.  optabs.o varasm.o symout.o dbxout.o sdbout.o emit-rtl.o insn-emit.o \
  182.  integrate.o jump.o cse.o loop.o flow.o stupid.o combine.o \
  183.  regclass.o local-alloc.o global-alloc.o reload.o reload1.o caller-save.o \
  184.  insn-peep.o final.o recog.o insn-recog.o insn-extract.o insn-output.o
  185.  
  186. # Files to be copied away after each stage in building.
  187. STAGE_GCC=gcc
  188. STAGESTUFF = *.o insn-flags.h insn-config.h insn-codes.h \
  189.  insn-output.c insn-recog.c insn-emit.c insn-extract.c insn-peep.c \
  190.  stamp-flags.h stamp-config.h stamp-codes.h \
  191.  stamp-output.c stamp-recog.c stamp-emit.c stamp-extract.c stamp-peep.c \
  192.  genemit genoutput genrecog genextract genflags gencodes genconfig genpeep \
  193.  g++ cc1plus ld++ g++filt collect collect2 collect3
  194.  
  195. # Header files that are made available to programs compiled with gcc.
  196. USER_H = stddef.h stdarg.h assert.h va-*.h limits.h
  197.  
  198. # The files that "belong" in CONFIG_H are deliberately omitted
  199. # because having them there would not be useful in actual practice.
  200. # All they would do is cause complete recompilation every time
  201. # one of the machine description files is edited.
  202. # That may or may not be what one wants to do.
  203. # If it is, rm *.o is an easy way to do it.
  204. # CONFIG_H = config.h tm.h
  205. CONFIG_H =
  206. RTL_H = rtl.h rtl.def machmode.def
  207. TREE_H = tree.h real.h tree.def machmode.def
  208. CPLUS_TREE_H = $(TREE_H) cplus-tree.h cplus-tree.def
  209.  
  210. # Note that dependencies on obstack.h are not written
  211. # because that file is not part of GCC.
  212. # Dependencies on gvarargs.h are not written
  213. # because all that file does, when not compiling with GCC,
  214. # is include the system varargs.h.
  215.  
  216. # gnulib is not a target because a proper installation of GNU CC
  217. # will place it where g++ can find it.  Same with cpp
  218. all: init_files gnulib g++ cc1plus g++filt $(LD) # collect crt0+.o
  219. # On COFF systems, use the target below.
  220. # all: g++ cc1plus init_files collect gnulib # crt0+.o crt1+.o
  221.  
  222. doc: $(srcdir)/cpp.info $(srcdir)/g++.info
  223.  
  224. compilations: ${OBJS} ${CPLUS_OBJS}
  225.  
  226. g++: gcc.o version.o $(LIBDEPS)
  227.     $(CC) $(CFLAGS) $(LDFLAGS) -o g++ gcc.o version.o $(LIBS)
  228.  
  229. # Note: If you have SunOS 4.0, you can't use GNU LD to link programs
  230. # which use shared libraries.  You could add -DNO_GNU_LD to this
  231. # command line, but be warned that collect takes twice the time
  232. # to compile all C++ static constructors, and it would
  233. # be better if you could just add support to GNU LD to handle
  234. # shared libraries.
  235. # And g++ is not able to generate PIC code, thus no g++ object can be
  236. # dynamically shared.
  237. gcc.o: gcc.c $(CONFIG_H)
  238.     $(CC) $(CFLAGS) $(COFFLAGS) $(INCLUDES) \
  239.   -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
  240.   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-\" -c \
  241.   `echo $(srcdir)/gcc.c | sed 's,^\./,,'`
  242.  
  243. version.o: version.c
  244. obstack.o: obstack.c
  245.  
  246. ld.o: ld.c
  247.     if cmp -s tm.h config/tm-sun3.h; then \
  248.         OPTS='-Dmc68020 -DSUN3=3 -DTARGET=SUN3'; \
  249.         DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
  250.     elif cmp -s tm.h config/tm-sun3-fpa.h; then \
  251.         OPTS='-Dmc68020 -DSUN3=3 -DTARGET=SUN3'; \
  252.         DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
  253.     elif cmp -s tm.h config/tm-sun3-nfp.h; then \
  254.         OPTS='-Dmc68020 -DSUN3=3 -DTARGET=SUN3'; \
  255.         DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
  256.     elif cmp -s tm.h config/tm-sun2.h; then \
  257.         OPTS='-Dmc68010 -DSUN2=2 -DTARGET=SUN2'; \
  258.         DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
  259.     elif cmp -s tm.h config/tm-sun4os3.h; then \
  260.         OPTS='-DSUN4=4 -DTARGET=SUN4'; \
  261.         DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
  262.     elif cmp -s tm.h config/tm-sun4os4.h; then \
  263.         OPTS='-DSUN4=4 -DTARGET=SUN4'; \
  264.         DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
  265.     elif cmp -s tm.h config/tm-sparc.h; then \
  266.         OPTS='-DSUN4=4 -DTARGET=SUN4'; \
  267.         DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
  268.     elif cmp -s tm.h config/tm-encore.h; then \
  269.         CRT0_OPTIONS='-DUMAX'; \
  270.         DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
  271.     elif cmp -s tm.h config/tm-hp9k320g.h; then \
  272.         OPTS='-Dmc68020 -DNON_NATIVE -DUSG' \
  273.         DFLTS='"$(libdir)/gnu", "/lib", "/usr/lib", "/usr/local/lib"';\
  274.     elif cmp -s tm.h config/tm-altos3068.h; then \
  275.         OPTS='-DCOFF_ENCAPSULATE -DNON_NATIVE -DUSG -DPORTAR'; \
  276.     elif cmp -s tm.h config/tm-newsgas.h; then \
  277.         CRT0_OPTIONS='-DCRT0_DUMMIES=bogus_fp, -DDOT_GLOBAL_START'; \
  278.     elif cmp -s tm.h config/tm-i386gas.h; then \
  279.         OPTS='-DUSG -DCOFF_ENCAPSULATE -DNON_NATIVE -DPORTAR'; \
  280.     else \
  281.         OPTS='-DTARGET=-1'; \
  282.         DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
  283.     fi; \
  284.     echo $$OPTS $$DFLTS; \
  285.     if [ "$$DFLTS" = "" ] ; \
  286.     then \
  287.     $(CC) -c -v $$OPTS $(PROFILE) $(CFLAGS) $(COFFLAGS) ld.c ; \
  288.     else \
  289.     $(CC) -c -v $$OPTS -DSTANDARD_SEARCH_DIRS="$$DFLTS" $(PROFILE) \
  290.             $(CFLAGS) $(COFFLAGS) ld.c ; \
  291.     fi
  292.  
  293. ld++: ld.o cplus-dem.o
  294.     $(CC) -o ld++ -g $(PROFILE) ld.o cplus-dem.o
  295.  
  296. collect: collect.c config.h $(LIBDEPS)
  297.     COLLECT_LIBS="-lld"; \
  298.     if cmp -s tm.h config/tm-encore.h; then \
  299.         COLLECT_OPTIONS='-DUMAX'; \
  300.     else \
  301.         COLLECT_OPTIONS=''; \
  302.     fi; \
  303.     $(CC) -o collect $(PROFILE) $$COLLECT_OPTIONS $(CFLAGS) $(COFFLAGS) \
  304.              $(INCLUDES) collect.c -lg -lc $$COLLECT_LIBS
  305.  
  306. collect3: collect3.c
  307.     $(CC) -o $@ collect3.c -DPREFIX="\"$(prefix)\"" \
  308.                    $(INCLUDES) $(PROFILE) $(CFLAGS) $(FORMAT)
  309.  
  310. g++filt: g++filt.o cplus-dem.o
  311.     $(CC) -o g++filt -g g++filt.o cplus-dem.o
  312.  
  313. crt0+.o: crt0.c config.h
  314.     -if cmp -s tm.h config/tm-vax.h; then \
  315.         CRT0_OPTIONS='-DCRT0_DUMMIES='; \
  316.     elif cmp -s tm.h config/tm-vaxv.h; then \
  317.         CRT0_OPTIONS='-DCRT0_DUMMIES='; \
  318.     elif cmp -s tm.h config/tm-vms.h; then \
  319.         CRT0_OPTIONS='-DCRT0_DUMMIES='; \
  320.     elif cmp -s tm.h config/tm-hp9k320.h; then \
  321.         CRT0_OPTIONS='-Umc68000'; \
  322.     elif cmp -s tm.h config/tm-hp9k320g.h; then \
  323.         CRT0_OPTIONS='-Umc68000'; \
  324.     elif cmp -s tm.h config/tm-sequent.h; then \
  325.         CRT0_OPTIONS='-DCRT0_DUMMIES= -DDOT_GLOBAL_START'; \
  326.     elif cmp -s tm.h config/tm-altos3068.h; then \
  327.         CRT0_OPTIONS='-DCRT0_DUMMIES= -Umc68000 -Um68k'; \
  328.     elif cmp -s tm.h tm-i386gas.h; then \
  329.         CRT0_OPTIONS='-DCRT0_DUMMIES=bogus_fp, -DDOT_GLOBAL_START'; \
  330.     elif cmp -s tm.h config/tm-hp9k3bsd.h; then \
  331.         CRT0_OPTIONS='-DCRT0_DUMMIES=bogus_a6, -Uhp9000'; \
  332.     else \
  333.         CRT0_OPTIONS=''; \
  334.     fi; \
  335.     echo $$CRT0_OPTIONS; \
  336.     $(CC) -Um68k $$CRT0_OPTIONS $(CFLAGS) -c $(INCLUDES) crt0.c
  337.     mv crt0.o crt0+.o
  338.  
  339. CRT1_COMMAND=$(CC) -Um68k $(CFLAGS) -c $(INCLUDES) crt1.c
  340.  
  341. init_files: ccrt0.o gccrt0.o
  342.  
  343. ccrt0.o: init_main.h init_main.c init.c init_libs.c
  344.     $(CC) $(CFLAGS) $(INCLUDES) -g -o $@ $(FORMAT) -c ccrt0.c
  345.  
  346. gccrt0.o: init_main.h init_main.c init.c init_libs.c
  347.     $(CC) $(CFLAGS) $(INCLUDES) -g -o $@ $(FORMAT) -DGPROF -c ccrt0.c
  348.  
  349. DUMMIES = _init_start _init_end _ctor_list _dtor_list _dl
  350.  
  351. gnulib: dummy.c
  352.     -rm -f tmpgnulib gnulib
  353.     cp $(libdir)/gcc-gnulib tmpgnulib
  354.     for name in $(DUMMIES);            \
  355.     do                                 \
  356.       echo $${name};                   \
  357.       rm -f $${name}.c;                \
  358.       cp $(srcdir)/dummy.c $${name}.c; \
  359.       $(CC) -DL$${name} $(CFLAGS) -c $${name}.c;   \
  360.       $(AR) r tmpgnulib $${name}.o;   \
  361.       rm -f $${name}.[co];            \
  362.     done
  363.     -if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ;\
  364.         then $(RANLIB) tmpgnulib; else true; fi
  365.     mv tmpgnulib gnulib
  366.  
  367. crt1+.o: crt1.c config.h
  368.     $(CRT1_COMMAND)
  369.     mv crt1.o crt1+.o
  370.  
  371. cc1plus: $(CPLUS_OBJS) $(OBJS) $(LIBDEPS) lastfile.o
  372.     $(CC) $(CFLAGS) $(LDFLAGS) -o cc1plus lastfile.o $(CPLUS_OBJS) $(OBJS) $(LIBS) -lm
  373.  
  374. cplus-decl.o : cplus-decl.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
  375.   cplus-parse.h cplus-decl.h stack.h rtl.h insn-flags.h
  376. cplus-decl2.o : cplus-decl2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h \
  377.   cplus-parse.h cplus-decl.h
  378. cplus-typeck.o : cplus-typeck.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  379. cplus-type2.o : cplus-type2.c $(CONFIG_H) $(CPLUS_TREE_H) flags.h
  380. cplus-tree.o : cplus-tree.c $(CONFIG_H) $(CPLUS_TREE_H)
  381. cplus-class.o : cplus-class.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h
  382. cplus-init.o : cplus-init.c $(CONFIG_H) $(CPLUS_TREE_H)
  383. cplus-except.o : cplus-except.c $(CONFIG_H) $(CPLUS_TREE_H)
  384. cplus-expr.o : cplus-expr.c $(CONFIG_H) $(CPLUS_TREE_H) $(RTL_H) insn-codes.h
  385. cplus-method.o : cplus-method.c $(CONFIG_H) $(CPLUS_TREE_H)
  386. cplus-cvt.o : cplus-cvt.c $(CONFIG_H) $(CPLUS_TREE_H)
  387. cplus-search.o : cplus-search.c $(CONFIG_H) $(CPLUS_TREE_H) stack.h
  388. cplus-ptree.o : cplus-ptree.c $(CONFIG_H) $(TREE_H)
  389.  
  390. cplus-tab.o : $(srcdir)/cplus-tab.c $(CONFIG_H) $(CPLUS_TREE_H) \
  391.    cplus-parse.h flags.h input.h
  392.     $(CC) -c $(CFLAGS) $(INCLUDES) -DPARSE_OUTPUT=\"$(PWD)/cplus-tab.out\"  `echo $(srcdir)/cplus-tab.c | sed 's,^\./,,'`
  393.  
  394. $(srcdir)/cplus-tab.c : $(srcdir)/cplus-parse.y
  395.     @echo expect 24 shift/reduce conflicts and 12 reduce/reduce conflicts
  396.     cd $(srcdir) ; \
  397.         $(BISON) $(BISONFLAGS) -o cplus-tab.c cplus-parse.y
  398.  
  399. cplus-lex.o : cplus-lex.c $(CONFIG_H) $(CPLUS_TREE_H) $(srcdir)/cplus-tab.h input.h
  400.     $(CC) -c $(CFLAGS) $(INCLUDES) $(USG_STDIO) cplus-lex.c
  401.  
  402. lastfile.o : lastfile.c
  403.  
  404. # Language-independent files.
  405.  
  406. tree.o : tree.c $(CONFIG_H) $(TREE_H) flags.h
  407. print-tree.o : print-tree.c $(CONFIG_H) $(TREE_H)
  408. stor-layout.o : stor-layout.c $(CONFIG_H) $(TREE_H) $(RTL_H)
  409. fold-const.o : fold-const.c $(CONFIG_H) $(TREE_H)
  410. toplev.o : toplev.c $(CONFIG_H) $(TREE_H) flags.h input.h
  411.     $(CC) -c $(CFLAGS) $(INCLUDES) $(HAVE_UNISTD_H) toplev.c
  412.  
  413. rtl.o : rtl.c $(CONFIG_H) $(RTL_H)
  414.  
  415. rtlanal.o : rtlanal.c $(CONFIG_H) $(RTL_H)
  416.  
  417. varasm.o : varasm.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h expr.h \
  418.    insn-codes.h hard-reg-set.h
  419. case.o : case.c $(CONFIG_H) $(RTL_H) $(TREE_H) insn-flags.h
  420. stmt.o : stmt.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  421.    insn-flags.h expr.h insn-config.h regs.h hard-reg-set.h insn-codes.h
  422. expr.o : expr.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  423.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h
  424. expmed.o : expmed.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  425.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h
  426. explow.o : explow.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h insn-codes.h
  427. optabs.o : optabs.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h  \
  428.    insn-flags.h insn-codes.h expr.h insn-config.h recog.h
  429. symout.o : symout.c $(CONFIG_H) $(TREE_H) $(RTL_H) symseg.h gdbfiles.h
  430. dbxout.o : dbxout.c $(CONFIG_H) $(TREE_H) $(RTL_H) flags.h $(CPLUS_TREE_H)
  431. sdbout.o : sdbout.c $(CONFIG_H) $(TREE_H) $(RTL_H)
  432.  
  433. emit-rtl.o : emit-rtl.c $(CONFIG_H) $(RTL_H) regs.h insn-config.h real.h
  434.  
  435. integrate.o : integrate.c $(CONFIG_H) $(RTL_H) $(TREE_H) flags.h expr.h \
  436.    insn-flags.h insn-codes.h
  437.  
  438. jump.o : jump.c $(CONFIG_H) $(RTL_H) flags.h regs.h
  439. stupid.o : stupid.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h
  440.  
  441. cse.o : cse.c $(CONFIG_H) $(RTL_H) regs.h hard-reg-set.h flags.h real.h
  442. loop.o : loop.c $(CONFIG_H) $(RTL_H) insn-config.h insn-codes.h \
  443.    regs.h hard-reg-set.h recog.h flags.h expr.h
  444. flow.o : flow.c $(CONFIG_H) $(RTL_H) basic-block.h regs.h hard-reg-set.h
  445. combine.o : combine.c $(CONFIG_H) $(RTL_H) flags.h  \
  446.    insn-config.h regs.h basic-block.h recog.h
  447. regclass.o : regclass.c $(CONFIG_H) $(RTL_H) hard-reg-set.h flags.h \
  448.    basic-block.h regs.h insn-config.h recog.h 
  449. local-alloc.o : local-alloc.c $(CONFIG_H) $(RTL_H) flags.h basic-block.h regs.h \
  450.    hard-reg-set.h insn-config.h recog.h
  451. global-alloc.o : global-alloc.c $(CONFIG_H) $(RTL_H) flags.h  \
  452.    basic-block.h regs.h hard-reg-set.h insn-config.h
  453.  
  454. reload.o : reload.c $(CONFIG_H) $(RTL_H) flags.h \
  455.    reload.h recog.h hard-reg-set.h insn-config.h regs.h
  456. reload1.o : reload1.c $(CONFIG_H) $(RTL_H) flags.h  \
  457.    reload.h regs.h hard-reg-set.h insn-config.h basic-block.h recog.h
  458. caller-save.o : caller-save.c $(CONFIG_H) $(RTL_H) flags.h \
  459.    reload.h regs.h hard-reg-set.h insn-config.h basic-block.h recog.h
  460. final.o : final.c $(CONFIG_H) $(RTL_H) flags.h regs.h recog.h conditions.h \
  461.    gdbfiles.h insn-config.h real.h output.h
  462. recog.o : recog.c $(CONFIG_H) $(RTL_H)  \
  463.    regs.h recog.h hard-reg-set.h insn-config.h real.h
  464.  
  465. # Normally this target is not used; but it is used if you
  466. # define ALLOCA=alloca.o.  In that case, you must get a suitable alloca.c
  467. # from the GNU Emacs distribution.
  468. # Note some machines won't allow $(CC) without -S on this source file.
  469. alloca.o:    alloca.c
  470.     $(CC) $(CFLAGS) -S `echo $(srcdir)/alloca.c | sed 's,^\./,,'`
  471.     as alloca.s -o alloca.o
  472.  
  473. # Now the source files that are generated from the machine description.
  474.  
  475. .PRECIOUS: insn-config.h insn-flags.h insn-codes.h \
  476.   insn-emit.c insn-recog.c insn-extract.c insn-output.c insn-peep.c
  477.  
  478. # The following pair of rules has this effect:
  479. # genconfig is run only if the md has changed since genconfig was last run;
  480. # but the file insn-config.h is touched only when its contents actually change.
  481.  
  482. # Each of the other insn-* files is handled by a similar pair of rules.
  483.  
  484. insn-config.h: stamp-config.h ;
  485. stamp-config.h : md genconfig
  486.     ./genconfig md > tmp-insn-config.h
  487.     $(srcdir)/move-if-change tmp-insn-config.h insn-config.h
  488.     touch stamp-config.h
  489.  
  490. insn-flags.h: stamp-flags.h ;
  491. stamp-flags.h : md genflags
  492.     ./genflags md > tmp-insn-flags.h
  493.     $(srcdir)/move-if-change tmp-insn-flags.h insn-flags.h
  494.     touch stamp-flags.h
  495.  
  496. insn-codes.h: stamp-codes.h ;
  497. stamp-codes.h : md gencodes
  498.     ./gencodes md > tmp-insn-codes.h
  499.     $(srcdir)/move-if-change tmp-insn-codes.h insn-codes.h
  500.     touch stamp-codes.h
  501.  
  502. insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) expr.h real.h insn-codes.h \
  503.   insn-config.h insn-flags.h
  504.     $(CC) $(CFLAGS) $(INCLUDES) -c insn-emit.c
  505.  
  506. insn-emit.c: stamp-emit.c ;
  507. stamp-emit.c : md genemit
  508.     ./genemit md > tmp-insn-emit.c
  509.     $(srcdir)/move-if-change tmp-insn-emit.c insn-emit.c
  510.     touch stamp-emit.c
  511.  
  512. insn-recog.o : insn-recog.c $(CONFIG_H) $(RTL_H) insn-config.h real.h
  513.     $(CC) $(CFLAGS) $(INCLUDES) -c insn-recog.c
  514.  
  515. insn-recog.c: stamp-recog.c ;
  516. stamp-recog.c : md genrecog
  517.     ./genrecog md > tmp-insn-recog.c
  518.     $(srcdir)/move-if-change tmp-insn-recog.c insn-recog.c
  519.     touch stamp-recog.c
  520.  
  521. insn-extract.o : insn-extract.c $(RTL_H)
  522.     $(CC) $(CFLAGS) $(INCLUDES) -c insn-extract.c
  523.  
  524. insn-extract.c: stamp-extract.c ;
  525. stamp-extract.c : md genextract
  526.     ./genextract md > tmp-insn-extract.c
  527.     $(srcdir)/move-if-change tmp-insn-extract.c insn-extract.c
  528.     touch stamp-extract.c
  529.  
  530. insn-peep.o : insn-peep.c $(CONFIG_H) $(RTL_H) regs.h real.h
  531.     $(CC) $(CFLAGS) $(INCLUDES) -c insn-peep.c
  532.  
  533. insn-peep.c: stamp-peep.c ;
  534. stamp-peep.c : md genpeep
  535.     ./genpeep md > tmp-insn-peep.c
  536.     $(srcdir)/move-if-change tmp-insn-peep.c insn-peep.c
  537.     touch stamp-peep.c
  538.  
  539. insn-output.o : insn-output.c $(CONFIG_H) $(RTL_H) regs.h real.h conditions.h \
  540.     hard-reg-set.h insn-config.h insn-flags.h output.h aux-output.c
  541.     $(CC) $(CFLAGS) $(INCLUDES) -c insn-output.c
  542.  
  543. insn-output.c: stamp-output.c ;
  544. stamp-output.c : md genoutput
  545.     ./genoutput md > tmp-insn-output.c
  546.     $(srcdir)/move-if-change tmp-insn-output.c insn-output.c
  547.     touch stamp-output.c
  548.  
  549. # Now the programs that generate those files.
  550. # $(CONFIG_H) is omitted from the deps of the gen*.o
  551. # because these programs don't really depend on anything 
  552. # about the target machine.  They do depend on config.h itself,
  553. # since that describes the host machine.
  554.  
  555. genconfig : genconfig.o rtl.o $(LIBDEPS)
  556.     $(CC) $(CFLAGS) $(LDFLAGS) -o genconfig genconfig.o rtl.o $(LIBS)
  557.  
  558. genconfig.o : genconfig.c $(RTL_H) config.h
  559.  
  560. genflags : genflags.o rtl.o $(LIBDEPS)
  561.     $(CC) $(CFLAGS) $(LDFLAGS) -o genflags genflags.o rtl.o $(LIBS)
  562.  
  563. genflags.o : genflags.c $(RTL_H) config.h
  564.  
  565. gencodes : gencodes.o rtl.o $(LIBDEPS)
  566.     $(CC) $(CFLAGS) $(LDFLAGS) -o gencodes gencodes.o rtl.o $(LIBS)
  567.  
  568. gencodes.o : gencodes.c $(RTL_H) config.h
  569.  
  570. genemit : genemit.o rtl.o $(LIBDEPS)
  571.     $(CC) $(CFLAGS) $(LDFLAGS) -o genemit genemit.o rtl.o $(LIBS)
  572.  
  573. genemit.o : genemit.c $(RTL_H) config.h
  574.  
  575. genrecog : genrecog.o rtl.o $(LIBDEPS)
  576.     $(CC) $(CFLAGS) $(LDFLAGS) -o genrecog genrecog.o rtl.o $(LIBS)
  577.  
  578. genrecog.o : genrecog.c $(RTL_H) config.h
  579.  
  580. genextract : genextract.o rtl.o $(LIBDEPS)
  581.     $(CC) $(CFLAGS) $(LDFLAGS) -o genextract genextract.o rtl.o $(LIBS)
  582.  
  583. genextract.o : genextract.c $(RTL_H) config.h
  584.  
  585. genpeep : genpeep.o rtl.o $(LIBDEPS)
  586.     $(CC) $(CFLAGS) $(LDFLAGS) -o genpeep genpeep.o rtl.o $(LIBS)
  587.  
  588. genpeep.o : genpeep.c $(RTL_H) config.h
  589.  
  590. genoutput : genoutput.o rtl.o $(LIBDEPS)
  591.     $(CC) $(CFLAGS) $(LDFLAGS) -o genoutput genoutput.o rtl.o $(LIBS)
  592.  
  593. genoutput.o : genoutput.c $(RTL_H) config.h
  594.  
  595. # Making the preprocessor
  596. cpp: cccp
  597.     -rm -f cpp
  598.     ln cccp cpp
  599. cccp: cccp.o cexp.o version.o $(LIBDEPS)
  600.     $(CC) $(CFLAGS) $(LDFLAGS) -o cccp cccp.o cexp.o version.o $(LIBS)
  601. cexp.o: cexp.c
  602. cexp.c: cexp.y
  603.     $(BISON) cexp.y
  604.     mv cexp.tab.c cexp.c
  605. cccp.o: cccp.c
  606.     $(CC) $(CFLAGS) $(INCLUDES) \
  607.           -DGCC_INCLUDE_DIR=\"$(libdir)/gcc-include\" \
  608.           -DGPLUSPLUS_INCLUDE_DIR=\"$(libdir)/g++-include\" -c cccp.c
  609.  
  610. $(srcdir)/g++.info: $(srcdir)/g++.texinfo
  611.     makeinfo `echo $(srcdir)/g++.texinfo | sed 's,^\./,,'`
  612.  
  613. # gnulib is not deleted because deleting it would be inconvenient
  614. # for most uses of this target.
  615. clean:
  616.     -rm -f $(STAGESTUFF) $(STAGE_GCC)
  617.     -rm -f stamp-*.[ch] tmp-insn-*
  618.     -rm -f *.s *.s[0-9] *.co *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop *.dbr *.jump2
  619.     -rm -f core hard-params
  620.  
  621. # Like clean but also delete the links made to configure gcc.
  622. # Also removes gnulib, since that is desirable if you are changing cpus.
  623. cleanconfig: clean
  624.     -rm -f tm.h aux-output.c config.h md config.status gnulib
  625.  
  626. # Get rid of every file that's generated from some other file (except INSTALL).
  627. realclean: cleanconfig
  628.     -rm -f cpp.aux cpp.cps cpp.fns cpp.info cpp.kys cpp.pgs cpp.tps cpp.vrs
  629.     -rm -f cplus-tab.c cplus-tab.out cplus-tab.h
  630.     -rm -f errs gnulib cexp.c TAGS tm-*+.h
  631.     -rm -f g++.info* g++.?? g++.??s g++.log g++.toc g++.*aux
  632.     -rm -f *.dvi
  633.  
  634. # Copy the files into directories where they will be run.
  635. install: all
  636.     -mkdir $(libdir)
  637.     -mkdir $(bindir)
  638.     -mkdir $(startdir)
  639.     -if [ -f cc1plus ] ; then $(INSTALL) cc1plus  $(libdir)/gcc-cc1plus ;fi
  640.     -if [ -f collect ] ; then $(INSTALL) collect  $(libdir)/gcc-collect ;fi
  641.     -if [ -f collect2 ] ; then $(INSTALL) collect2  $(libdir)/gcc-ld ;fi
  642.     -if [ -f collect3 ] ; then $(INSTALL) collect3  $(libdir)/gcc-ld ;fi
  643.     $(INSTALL) g++ $(bindir)
  644.     -if [ -f crt0+.o ] ; then $(INSTALL) crt0+.o $(startdir)/crt0+.o ;fi
  645.     -if [ -f crt1+.o ] ; then $(INSTALL) crt1+.o $(startdir)/crt1+.o ;fi
  646.     -if [ -f ccrt0.o ] ; \
  647.         then $(INSTALL) ccrt0.o $(startdir)/gcc-ccrt0.o ;fi
  648.     -if [ -f gccrt0.o ] ; \
  649.         then $(INSTALL) gccrt0.o $(startdir)/gcc-gccrt0.o ;fi
  650.     -if [ -f gnulib ] ; \
  651.         then $(INSTALL) gnulib  $(libdir)/gcc-gnulib ; \
  652.              if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; \
  653.             then $(RANLIB) $(libdir)/gcc-gnulib ; else true ; \
  654.          fi ; \
  655.          fi
  656.     -mkdir $(libdir)/g++-include
  657.     -chmod ugo+rx $(libdir)/g++-include
  658.  
  659. install-ld: ld++
  660.     $(INSTALL) ld++ $(libdir)/gcc-ld
  661.  
  662. # do make -f Makefile maketest DIR=../gcc TDIR=../gcc-test
  663. # in the intended test directory to make it a suitable test directory.
  664. maketest:
  665.     -rm -f =*
  666.     -$(LINK) $(DIR)/.gdbinit .
  667.     -$(LINK) $(DIR)/bison.simple .
  668.     -$(LINK) $(DIR)/config.gcc .
  669.     -$(LINK) $(DIR)/move-if-change .
  670.     $(MAKE) clean
  671.     DIR=$(DIR) CDIR=$(CDIR) ./make-links.g++
  672.     -$(LINK) $(DIR)/genemit.c $(DIR)/genoutput.c $(DIR)/genrecog.c \
  673.       $(DIR)/genextract.c $(DIR)/genflags.c $(DIR)/gencodes.c \
  674.       $(DIR)/genconfig.c $(DIR)/genpeep.c .
  675.     -$(LINK) $(TDIR)/obstack.o $(TDIR)/rtl.o $(TDIR)/emit-rtl.o \
  676.       $(TDIR)/jump.o $(TDIR)/cse.o \
  677.       $(TDIR)/loop.o $(TDIR)/flow.o $(TDIR)/stupid.o $(TDIR)/combine.o \
  678.       $(TDIR)/regclass.o $(TDIR)/local-alloc.o $(TDIR)/global-alloc.o \
  679.       $(TDIR)/reload.o $(TDIR)/reload1.o $(TDIR)/caller-save.o \
  680.       $(TDIR)/final.o $(TDIR)/recog.o $(TDIR)/genemit \
  681.       $(TDIR)/genoutput $(TDIR)/genrecog $(TDIR)/genextract \
  682.       $(TDIR)/genflags $(TDIR)/gencodes $(TDIR)/genconfig \
  683.       $(TDIR)/genpeep .
  684.     -$(LINK) $(TDIR)/genemit.o $(TDIR)/genoutput.o $(TDIR)/genrecog.o \
  685.       $(TDIR)/genextract.o $(TDIR)/genflags.o $(TDIR)/gencodes.o \
  686.       $(TDIR)/genconfig.o $(TDIR)/genpeep.o .
  687.     -$(LINK) $(TDIR)/insn-emit.c $(TDIR)/insn-output.c $(TDIR)/insn-recog.c \
  688.       $(TDIR)/insn-extract.c $(TDIR)/insn-flags.h $(TDIR)/insn-codes.h \
  689.       $(TDIR)/insn-config.h $(TDIR)/insn-peep.c .
  690.     -rm tm.h aux-output.c config.h md
  691. # You must then run config.g++ to set up for compilation.
  692.  
  693. bootstrap: all force
  694.     echo GNU C++ does not bootstrap itself
  695.  
  696. .PHONY: stage1 stage2 stage3 #In GNU Make, ignore whether `stage*' exists.
  697. force:
  698.  
  699. TAGS: force
  700.     -mkdir temp
  701.     -mv cplus-tab.c cexp.c c-*.c *.y insn-*.[ch] gen*.c temp
  702.     etags *.h *.c
  703.     mv temp/* .
  704.     rmdir temp
  705.  
  706. #In GNU Make, ignore whether `stage*' exists.
  707. .PHONY: stage1 stage2 stage3 clean realclean TAGS bootstrap
  708.  
  709. force:
  710.